package com.fishingwithme.infrastructure.mapper;

import com.fishingwithme.domain.user.VerifyCode;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.Date;

@Mapper
public interface CodeVerifyMapper extends BaseMapper<VerifyCode> {
    int insert(VerifyCode record);

    VerifyCode selectByUserIdAndType(Long userId, String type);

    int deleteByUserIdAndType(Long userId, String type);

    int deleteExpiredCodes(Date currentTime);

}
